CXX=gcc

CFLAGS = -I./include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/
CFLAGS += -I/usr/lib64/glib-2.0/include/

LDFLAGS = -L./lib -lnice -ljson-c  -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -pthread -lglib-2.0

TARGET = client


SOURCE = ikcp.c kcp_client.c client.c ice_client.c utils.c queue.c msg.c custom.c
	
OBJS = $(SOURCE:%.c=obj/%.o)


$(TARGET): $(OBJS)
	$(CXX) -o $@ $(OBJS) $(LDFLAGS) 

obj/%.o:%.c
	@mkdir -p obj
	$(CXX) $(CFLAGS) -c $< -o $@

clean:
	rm -fr obj $(OBJS) $(TARGET)
